package com.multi.thread.chapter02.demo08.test02;

public class MyObject {
	
//	synchronized public void speedPrintString() {
//		System.out.println("speedPrintString_____getLock time = " + System.currentTimeMillis() 
//				+ ", run threadName = " + Thread.currentThread().getName());
//		System.out.println("---------------------");
//		System.out.println("speedPrintString releaseLock time = " + System.currentTimeMillis() 
//				+ ", run threadName = " + Thread.currentThread().getName());
//	}
	
	public void speedPrintString_this() {
		synchronized (this) {
			System.out.println("speedPrintString_____getLock time = " + System.currentTimeMillis() 
					+ ", run threadName = " + Thread.currentThread().getName());
			System.out.println("---------------------");
			System.out.println("speedPrintString releaseLock time = " + System.currentTimeMillis() 
					+ ", run threadName = " + Thread.currentThread().getName());
		}
	}

}
